package com.vimi8.ebb.model;

import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**

 * Created by think on 2016/7/8.

 */

public class AgriculturalLivestockTechnology implements Serializable {
    /**

     * The id.

     */

    private String id;
    /**

     * 转发人id

     */

    private String sendPeopleId;
    /**

     * 转发人姓名

     */

    private String sendPeopleName;
    /**

     * 转发时间

     */

    private Date sendTime;
    /**

     * 来源

     */

    private String source;
    /**

     * 题目

     */

    private  String title;
    /**

     * 文章摘要article_Abstract

     */

    private String summary;
    /**

     * logo图

     */

    private String img;
    /**

     * 内容

     */

    private String content;
    /**

     * 创建时间

     */

    private Date createdTime;

    /**

     *浏览量

     */
    private  String views;
    // setting & getting

    /**
     * 地址
     */
    private String addressCode;

    public String getAddressCode() {
        return addressCode;
    }

    public void setAddressCode(String addressCode) {
        this.addressCode = addressCode;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSendPeopleId() {
        return sendPeopleId;
    }

    public void setSendPeopleId(String sendPeopleId) {
        this.sendPeopleId = sendPeopleId;
    }

    public String getSendPeopleName() {
        return sendPeopleName;
    }

    public void setSendPeopleName(String sendPeopleName) {
        this.sendPeopleName = sendPeopleName;
    }

    public Date getSendTime() {
        return sendTime;
    }

    public void setSendTime(Date sendTime) {
        this.sendTime = sendTime;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public String getViews() {return views;}

    public void setViews(String views) {this.views = views;}

    public AgriculturalLivestockTechnology() {
    }

    public AgriculturalLivestockTechnology(String id, String sendPeopleId, String sendPeopleName, Date sendTime, String source, String title, String summary, String img, String content, Date createdTime , String views) {
        this.id = id;
        this.sendPeopleId = sendPeopleId;
        this.sendPeopleName = sendPeopleName;
        this.sendTime = sendTime;
        this.source = source;
        this.title = title;
        this.summary = summary;
        this.img = img;
        this.content = content;
        this.createdTime = createdTime;
        this.views = views;
    }

    public static List<AgriculturalLivestockTechnology> newBaseData(){
        List<AgriculturalLivestockTechnology> agriculturalLivestockTechnologyList= new ArrayList<>();
        return agriculturalLivestockTechnologyList;
    }


    /**

     * 字符串转换成日期

     * @param str

     * @return date

     */
    public static Date StrToDate(String str) {

        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date date = null;
        try {
            date = format.parse(str);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return date;
    }




}